<link rel="stylesheet" type="text/css" href="../addons/jy_weishop/custom/templates/mobile/css/coupon.css?v=2.0.0">
<div ng-if="pagedata.op=='list'" class='fui-page  fui-page-current coupon-my-page'>
    <div class="fui-header">
		<div class="fui-header-left">
			<a class="back" ng-click="goback()"></a>
		</div>
		<div class="title">我的活动报名凭证</div> 
		<div class="fui-header-right">&nbsp;</div>
    </div>
	<div class='fui-content'>
		<div class='fui-tab fui-tab-danger' id='cateTab'>
			<a href="javascript:;" ng-click="tool.get_list('jy_baoming/myitemfeelog/list/status=2',true);pagedata.status=2" ng-class="{'active':pagedata.status==2}" data-cate=''>已报名</a>
			<a href="javascript:;" ng-click="tool.get_list('jy_baoming/myitemfeelog/list/status=1',true);pagedata.status=1" ng-class="{'active':pagedata.status==1}" data-cate='used'>已支付</a>
			<a href="javascript:;" ng-click="tool.get_list('jy_baoming/myitemfeelog/list/status=0',true);pagedata.status=0" ng-class="{'active':pagedata.status==0}" data-cate='used'>待支付</a>
			<a href="javascript:;" ng-click="tool.get_list('jy_baoming/myitemfeelog/list/status=4',true);pagedata.status=4" ng-class="{'active':pagedata.status==4}" data-cate='past'>已完成</a>
		</div>
		<div class='content-empty' ng-show="!pagedata.list || pagedata.list.length<=0" style="margin:1rem;">
			<i class='icon icon-chakanpingjia' style="font-size:1.5rem"></i><br/>还没有报名记录!
		</div>
		<div id="container" class="coupon-container coupon-list">
			<div ng-repeat="item in pagedata.list" style="margin:0.3rem">
				<a class="coupon-item blue">
					<div class="coupon-dots">
							<i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i>
						</div>
						<div class="coupon-type" >{{item.typetitle || '参与'}}</div>
					<div class="coupon-left" href="javascript:;" ng-click="access_json('/item//id='+item.pid)">
						<div class="title blod" style="font-size:0.85rem">报名凭证</div>
						<div class="subtitle" style="font-size:0.56rem">报名序号：{{item.jieli_id || 1}}</div>
					</div>
					<div class="coupon-right">
						<div class="title" style="font-size:0.66rem">{{item.info.title || '活动名称'}}</div>
						<div ng-if="item.status>=1 || item.orderid==0" class="subtitle" style="font-size:0.56rem;color:#999">{{item.typetitle || '参与'}} +1 <span class="red">￥{{item.money || '0.00'}}</span></div>
						<div ng-if="item.status<=1 && item.orderid!=0" class="subtitle" style="font-size:0.56rem;color:#999">{{item.status==1?'已支付':'待支付'}}</div>
						<div ng-if="item.status==2" class="subtitle" style="font-size:0.56rem;color:#999">已完成</div>
						<div class="usetime">
							<div class="text">
								<div>时间:
									{{item.createtime}}
								</div>
							</div>
							
							<div class="usebtn">
								<div ng-click="access_json('/myitemfeelog/detail/id='+item.id)">
									查看详情
								</div>									
							</div>
						</div>
					</div>
			</a>
		</div>
		</div>
	</div>
</div>
<div class="order-list-page" ng-if="pagedata.op == 'detail'">
    <div class="fui-header">
		<div class="fui-header-left" ng-click="goback()">
            <a class="back"></a>
        </div>
		<div class="title">报名详情</div>
		<div class="fui-header-right"></div>
	</div>
	<div class='fui-content member-page' style="top:0">
		<div style="padding:0 0.5rem;">
		<div class="fui-list-group merchgroup">
			<div class="fui-list jump">
                <a class="fui-list-media">
                    <img class="round" src="{{tomedia(pagedata.member.avatar) || '../core/resource/images/nopic.jpg'}}" />
                </a>
                <div class="fui-list-inner">
					<div class="title" style="font-size:0.65rem">昵称：{{pagedata.member.nickname}}</div>
					<div class="title" style="font-size:0.65rem">手机号：{{pagedata.member.mobile}}</div>
                </div>
                <a class="jump" href="javascript:;">
					
				</a>
            </div>
		</div>
		<div class="weui_cells">
			<div class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>活动名称</span>
					</div>
					<div class="weui_cell_ft" ng-model="pagedata.post.serve_title">{{pagedata.activity.title}}</div>
			</div>
			<div class="weui_cells_title" style="padding:0.3rem 0.6rem;margin-top:0">活动内容：</div>
			<div ng-bind-html="trust(pagedata.activity.remark)" class="weui_cells content-images" style="padding:0.3rem 0.6rem">
			</div>
			<div class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>活动时间</span>
					</div>
					<div class="weui_cell_ft" ng-model="pagedata.post.time">{{pagedata.activity.time}}</div>
			</div>
			<div class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>活动地址</span>
					</div>
					<div class="weui_cell_ft" ng-model="pagedata.post.address">{{pagedata.activity.address}}</div>
			</div>
			<div class="weui_cell" >
					<div class="weui_cell_bd weui_cell_primary">
						<span>报名费用</span>
					</div>
					<div class="weui_cell_ft" ng-model="pagedata.post.package_price">{{pagedata.order.money}}元</div>
			</div>
			<div class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>实际支付</span>
					</div>
					<div class="weui_cell_ft" ng-model="pagedata.post.package_price">{{pagedata.order.pay}}元</div>
			</div>
		</div>
		<div class="weui_cells">
			<div class="weui_cells_title" style="padding:0 0.6rem;">报名信息：</div>
			<div class="weui_cell" ng-repeat="item in pagedata.order.diyfrom">
					<div class="weui_cell_bd weui_cell_primary">
						<span>{{item.title}}</span>
					</div>
					<div ng-if="item.type == 1 || item.type == 2 || item.type == 6" class="weui_cell_ft" ng-model="pagedata.post.package_price">{{item.data}}</div>
					 <div class="weui_cell_ft" ng-if="item.type == 3">
						<ul class="weui_uploader_files">
							 <li class="weui_uploader_file" style="background-image:url({{tomedia(item.data)  || '../core/resource/images/nopic.jpg'}})"></li>
						</ul>
					</div>
					<div ng-if="item.type == 4 || item.type == 5" class="weui_cell_ft">
						<span class="jylabel jylabel-f60" ng-repeat="(k,v) in item.data track by $index">{{v}}</span>
					</div>
					<div ng-if="item.type == 7" class="weui_cell_ft">
						<span class="jylabel jylabel-f60">{{item.data.province}}</span>
						<span class="jylabel jylabel-f60">{{item.data.city}}</span>
						<span class="jylabel jylabel-f60">{{item.data.district}}</span>
						<span class="jylabel jylabel-f60">{{item.data.street}}</span>
					</div>
			</div>
		</div>
		</div>
	</div>
</div><script>
scope.pagedata.buypay=function(id){
	scope.post_json('/myitemfeelog/pay/id='+id,{},function(pay_id){
		require(['tool'],function(tool){
			tool.pay(pay_id,function(res){
				console.log('收到支付结果！');
				if(res.type=='success'){
					scope.message('支付成功！','','myitemfeelog/');
				}else{
					scope.message('充值失败！');
				}
			});
		});
	});
}
if(scope.pagedata.op=='list'){
	scope.tool.get_list('jy_baoming/myitemfeelog/list/',true);
	scope.pagedata.scroll_bottom=function(){
		scope.tool.get_list('jy_baoming/myitemfeelog/list/status='+scope.pagedata.status);
	}
}

</script>